////////////////////////////////////////////////////////////////////
// File:				boincviz.cpp
// Original Author:		Gerald Leung (GL)
// Creation Date:		Tue May 06 22:21:00 PST 2008
// Spec:				http://www.csua.berkeley.edu/~gerald/
// Purpose:				Application framework using GLUT
////////////////////////////////////////////////////////////////////
// Author:				Gerald Leung
// Creation Date:		Friday, February 05, 2010 7:40:26 PM
// Spec:				http://
// Purpose:				BOINC Visualization
////////////////////////////////////////////////////////////////////

// Forward Declarations: GLUT Callbacks Something Meaningful
// These're defined statically.  It's not perfect encapsulation
// but that would require incorporating the callbacks into
// the class which involves a bunch of pointer-to-members issues.
void	Idle			();
void	Display			();
void	Motion			(int x, int y);
void	Mouse			(int btn, int state, int x, int y);
void	InputKBSpecial	(int key, int x, int y);
void	InputKB			(unsigned char key, int x, int y);
void	Reshape			(int w, int h);
void	printArgs		(int argc, char* argv[]);

#include	"Renderer.h"
CRenderer	*prGlutRenderer;


int		main			(int argc, char * argv[])
{
	// GLUT renderer
	prGlutRenderer		= new CRenderer(argc, argv);

	// CRenderer MainLoop
	glutMainLoop();

	return 0;
}
void	Idle			()
{
	prGlutRenderer->Idle();
}

void	Display			()
{
	prGlutRenderer->Display();
}

void	Mouse			(int btn, int state, int x, int y)
{
	prGlutRenderer->Mouse			(btn, state, x, y);
}

void	Motion			(int x, int y)
{
	prGlutRenderer->Motion			(x, y);
}

void	InputKBSpecial	(int key, int x, int y)
{
	prGlutRenderer->InputKBSpecial(key, x, y);
}

void	InputKB			(unsigned char key, int x, int y)
{
	prGlutRenderer->InputKB(key, x, y);
}

void	Reshape			(int w, int h)
{
	prGlutRenderer->Reshape(w, h);
}
